package vn.fpt.fsoft.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Author DuongPV1
 * Entity GovOfficeRegion mapping with GovOfficeRegion table 
 * */

@Entity
@Table(name="GovOfficeRegion")
public class GovOfficeRegion implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3727647878255445029L;
	private int govOfficeRegionId;
	private County county;
	private String govOfficeRegionName;
	private String description;
	private Integer nationId;
	private Boolean status;
	public GovOfficeRegion() {
		
	}
	
	/**
	 * @param govOfficeRegionId
	 * @param county
	 * @param govOfficeRegionName
	 * @param description
	 * @param nationId
	 * @param status
	 */
	public GovOfficeRegion(int govOfficeRegionId, County county,
			String govOfficeRegionName, String description, Integer nationId,
			Boolean status) {
		super();
		this.govOfficeRegionId = govOfficeRegionId;
		this.county = county;
		this.govOfficeRegionName = govOfficeRegionName;
		this.description = description;
		this.nationId = nationId;
		this.status = status;
	}
	@Id
	@GeneratedValue
	@Column(name="GovOfficeRegionId",nullable=true,unique=true)
	public int getGovOfficeRegionId() {
		return govOfficeRegionId;
	}
	public void setGovOfficeRegionId(int govOfficeRegionId) {
		this.govOfficeRegionId = govOfficeRegionId;
	}
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="CountyId",nullable=true)
	public County getCounty() {
		return county;
	}
	public void setCounty(County county) {
		this.county = county;
	}
	@Column(name="GovOfficeRegionName",nullable=true,length=50)
	public String getGovOfficeRegionName() {
		return govOfficeRegionName;
	}
	public void setGovOfficeRegionName(String govOfficeRegionName) {
		this.govOfficeRegionName = govOfficeRegionName;
	}
	@Column(name="Description",nullable=true)
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	@Column(name="NationId",nullable=true)
	public Integer getNationId() {
		return nationId;
	}
	public void setNationId(Integer nationId) {
		this.nationId = nationId;
	}
	@Column(name="Status")
	public Boolean getStatus() {
		return status;
	}
	public void setStatus(Boolean status) {
		this.status = status;
	}
	
}
